/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package researchgrants.parts.LoggedData;

/**
 *
 * @author DOStudent1
 */
public class LogableString implements LogableObject {
    
    private String value=null;
    private boolean isSet=false;
    
    public LogableString() {
    }
    
    public LogableString fromString(String value) {
        LogableString res=new LogableString();
        res.value=value;
        res.isSet=true;
        return(res);
    }

    
    public boolean isSet() {
        return(isSet);
    }
    
    
    
    public String getString() {
        if (!isSet) {
            throw new RuntimeException("Not initialized");
        }
        return(value);
    }

    public LoggedLogableObject toLoggedMyObject() {
        LoggedLogableString loggedMyString=new LoggedLogableString();
        return(loggedMyString.fromLogableObject(this));
    }

    public boolean isEmpty() {
        return(value==null || value.equals(""));
    }

}
